﻿using MineMES.Domain.Entity;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MineMES.Domain.Entity
{
    [Table("Sys_Menu")]
    public class Sys_Menu : BaseEntity
    {
        //暂时先用贫血型领域
        //private readonly IAbpDapperRepository<Users> _DapperRepository;//Dapper

        //public Users(IRepository<Users> repository)
        //{
        //    this._repository = repository;
        //}

        /// <summary>
        /// 菜单代码
        /// </summary>
        [MaxLength(100)]
        public string MenuNo { get; set; }
        /// <summary>
        /// 菜单名称
        /// </summary>
        [MaxLength(100)]
        public string MenuName { get; set; }
        /// <summary>
        /// 菜单路径
        /// </summary>
        [MaxLength(100)]
        public string MenuUrl { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(100)]
        public string Remarks { get; set; }

        //todo..

        //暂时先用贫血型领域
        //public bool GetInfo(string id)
        //{
        //    var user= _repository.GetAsync(x => x.Id.ToString() == id).Result;
        //    if (user != null)
        //        return true;
        //    else
        //        return false;
        //}
    }
}
